#include "../../include/SinglyLinkedList.h"

void test1() {
	SinglyLinkedList<int> list;
	list.pushFront(1);
	list.pushFront(2);
	list.pushFront(3);
	list.pushFront(4);
	list.pushFront(5);
    list.pushBack(6);
    list.pushBack(7);
	cout << list << endl;

//    int n = list.size();
//    for (int i = 0; i < n; i++) {
//        list.popBack();
//        cout << list << endl;
//    }

	cout << list.front() << endl;
    cout << list.back() << endl;
    cout << list.indexAt(list.size() - 1) << endl;

    list.addAfter(0, 8);
    cout << list << endl;

    list.removeAt(0);
    cout << list << endl;
    list.removeAt(list.size() - 1);
    cout << list << endl;
    list.removeAt(3);
    cout << list << endl;
    cout << list.find(7) << endl;
    cout << list << endl;
    list.clear();

}

int main() {
	test1();
	return 0;
}